import 'dart:convert' show json;

class MessageListBean {
  int PageIndex;
  int PageSize;
  int TotalCount;
  List<MessageBean> MessageList;
  List<RobbingBean> RobbingMessageList;

  MessageListBean.fromParams(
      {this.PageIndex,
      this.PageSize,
      this.TotalCount,
      this.MessageList,
      this.RobbingMessageList});

  MessageListBean.fromJson(jsonRes) {
    PageIndex = jsonRes['PageIndex'];
    PageSize = jsonRes['PageSize'];
    TotalCount = jsonRes['TotalCount'];
    MessageList = jsonRes['MessageList'] == null ? null : [];

    for (var MessageListItem
        in MessageList == null ? [] : jsonRes['MessageList']) {
      MessageList.add(MessageListItem == null
          ? null
          : new MessageBean.fromJson(MessageListItem));
    }

    RobbingMessageList = jsonRes['RobbingMessageList'] == null ? null : [];

    for (var RobbingMessageListItem
        in RobbingMessageList == null ? [] : jsonRes['MessageList']) {
      RobbingMessageList.add(RobbingMessageListItem == null
          ? null
          : new RobbingBean.fromJson(RobbingMessageListItem));
    }
  }

  @override
  String toString() {
    return '{"PageIndex": $PageIndex,"PageSize": $PageSize,"TotalCount": $TotalCount,"MessageList": $MessageList,"RobbingMessageList": $RobbingMessageList}';
  }
}

class MessageBean {
  int CuleId;
  int CuleState;
  int Deleted;
  int IsHandle;
  int MesaageType;
  int MessageId;
  int OperateAgentId;
  int ReciveAgentId;
  int TimeoutNoticeCount;
  double TimeDifference;
  String Content;
  String CreateTime;
  String Title;

  MessageBean.fromParams(
      {this.CuleId,
      this.CuleState,
      this.Deleted,
      this.IsHandle,
      this.MesaageType,
      this.MessageId,
      this.OperateAgentId,
      this.ReciveAgentId,
      this.TimeoutNoticeCount,
      this.TimeDifference,
      this.Content,
      this.CreateTime,
      this.Title});

  MessageBean.fromJson(jsonRes) {
    CuleId = jsonRes['CuleId'];
    CuleState = jsonRes['CuleState'];
    Deleted = jsonRes['Deleted'];
    IsHandle = jsonRes['IsHandle'];
    MesaageType = jsonRes['MesaageType'];
    MessageId = jsonRes['MessageId'];
    OperateAgentId = jsonRes['OperateAgentId'];
    ReciveAgentId = jsonRes['ReciveAgentId'];
    TimeoutNoticeCount = jsonRes['TimeoutNoticeCount'];
    TimeDifference = jsonRes['TimeDifference'];
    Content = jsonRes['Content'];
    CreateTime = jsonRes['CreateTime'];
    Title = jsonRes['Title'];
  }

  @override
  String toString() {
    return '{"CuleId": $CuleId,"CuleState": $CuleState,"Deleted": $Deleted,"IsHandle": $IsHandle,"MesaageType": $MesaageType,"MessageId": $MessageId,"OperateAgentId": $OperateAgentId,"ReciveAgentId": $ReciveAgentId,"TimeoutNoticeCount": $TimeoutNoticeCount,"TimeDifference": $TimeDifference,"Content": ${Content != null ? '${json.encode(Content)}' : 'null'},"CreateTime": ${CreateTime != null ? '${json.encode(CreateTime)}' : 'null'},"Title": ${Title != null ? '${json.encode(Title)}' : 'null'}}';
  }
}

class RobbingBean {
  int CuleId;
  String SourceName;
  int IsMany;
  int IsDrivering;
  String Tip;
  String BrandName;
  String LicenseNo;
  String CarOwner;
  String OrderNum;
  int SourceId;
  int MesaageType;

  RobbingBean.fromParams(
      {this.CuleId,
      this.SourceName,
      this.IsMany,
      this.IsDrivering,
      this.Tip,
      this.BrandName,
      this.LicenseNo,
      this.CarOwner,
      this.OrderNum,
      this.SourceId,
      this.MesaageType});

  RobbingBean.fromJson(jsonRes) {
    CuleId = jsonRes['CuleId'];
    SourceName = jsonRes['SourceName'];
    IsMany = jsonRes['IsMany'];
    IsDrivering = jsonRes['IsDrivering'];
    Tip = jsonRes['Tip'];
    BrandName = jsonRes['BrandName'];
    LicenseNo = jsonRes['LicenseNo'];
    CarOwner = jsonRes['CarOwner'];
    OrderNum = jsonRes['OrderNum'];
    SourceId = jsonRes['SourceId'];
    MesaageType = jsonRes['MesaageType'];
  }
}
